package com.wcll.www;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class LoginBean {
		public String verify(String user,String pass){
			String id=null; 
			try{
			Class.forName("com.mysql.jdbc.Driver");
			Connection con = DriverManager.getConnection("jdbc:mysql://localhost/jobs?useUnicode=true&characterEncoding=UTF8","root","");
			Statement st = con.createStatement();
			ResultSet rs = st.executeQuery("select id,cor_password from job_corporation where cor_name='"+user+"'");
			while(rs.next()){
				String s =rs.getString("cor_password");
				if(s.equals(new String(pass))){
					id=rs.getString("id");
				}
				
			}
			st.close();
			rs.close();
			}catch(Exception e){}
			return id;	
			
			}
}
